//
// Copyright (c) Microsoft Corporation.  All rights reserved.
//
//
// Use of this sample source code is subject to the terms of the Microsoft
// license agreement under which you licensed this sample source code. If
// you did not accept the terms of the license agreement, you are not
// authorized to use this sample source code. For the terms of the license,
// please see the license agreement between you and Microsoft or, if applicable,
// see the LICENSE.RTF on your install media or the root of your tools installation.
// THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES.
//
//////////////////////////////////////////////////////////////////////////////
// Copyright (C) 2003 Intrinsyc Europe Ltd.
//////////////////////////////////////////////////////////////////////////////
// Copyright (C) 2004 Siemens AG
//
// Version: 1.1.2.5
// Date:    11. Jan. 2006
//////////////////////////////////////////////////////////////////////////////


#pragma once

#define GPRS_WAIT_FOR_ATTACH  1200            // Timeout (in 100ms) for waiting for a successfull GPRS attach (+CGERG: 1 or +CGREG: 5)

HRESULT RILDrv_GetSystemTime                     (DWORD dwParam);
HRESULT RILDrv_GetGPRSContextList                (DWORD dwParam);
HRESULT RILDrv_SetGPRSContext                    (DWORD dwParam, const RILGPRSCONTEXT* lpGprsContext);
HRESULT RILDrv_DeleteGPRSContext                 (DWORD dwParam, DWORD dwContextID);
HRESULT RILDrv_GetRequestedQualityOfServiceList  (DWORD dwParam);
HRESULT RILDrv_SetRequestedQualityOfService      (DWORD dwParam, const RILGPRSQOSPROFILE* lpGprsQosProfile);
HRESULT RILDrv_DeleteRequestedQualityOfService   (DWORD dwParam, DWORD dwContextID);
HRESULT RILDrv_GetMinimumQualityOfServiceList    (DWORD dwParam);
HRESULT RILDrv_SetMinimumQualityOfService        (DWORD dwParam, const RILGPRSQOSPROFILE* lpGprsQosProfile);
HRESULT RILDrv_DeleteMinimumQualityOfService     (DWORD dwParam, DWORD dwContextID);
HRESULT RILDrv_SetGPRSAttached                   (DWORD dwParam, BOOL fAttached);
HRESULT RILDrv_GetGPRSAttached                   (DWORD dwParam);
HRESULT RILDrv_SetGPRSContextActivated           (DWORD dwParam, DWORD dwContextID, BOOL fContextActivation);
HRESULT RILDrv_GetGPRSContextActivatedList       (DWORD dwParam);
HRESULT RILDrv_EnterGPRSDataMode                 (DWORD dwParam, const RILENTERGPRSDATAMODE * lpEnterGprsDataMode);
HRESULT RILDrv_GetGPRSAddress                    (DWORD dwParam, DWORD dwContextID);
HRESULT RILDrv_SetGPRSAutoAnswer                 (DWORD dwParam, BOOL fAutoAnswer);
HRESULT RILDrv_GetGPRSAttachState                (DWORD dwParam);
HRESULT RILDrv_GPRSAnswer                        (DWORD dwParam, const RILGPRSANSWER *lpGprsAnswer);
HRESULT RILDrv_GetGPRSRegistrationStatus         (DWORD dwParam);
HRESULT RILDrv_GetGPRSClass                      (DWORD dwParam);
HRESULT RILDrv_SetGPRSClass                      (DWORD dwParam, DWORD dwClass);
HRESULT RILDrv_GetMOSMSService                   (DWORD dwParam);
HRESULT RILDrv_SetMOSMSService                   (DWORD dwParam, DWORD dwMoSmsService);
#ifdef SIEMENS_MAGNETO
HRESULT RILDrv_NdisSetGPRSContextActivated       (DWORD dwParam, const RILNDISSETGPRSCONTEXTACTIVATED *lpNdisSetGprsContextActivated );
HRESULT RILDrv_NdisReceivePacketDone             (DWORD dwParam, RILNDISPACKET* lpNdisPacket);
HRESULT RILDrv_NdisSendPacket                    (DWORD dwParam, RILNDISPACKET* lpNdisPacket);
#endif // SIEMENS_MAGNETO

HRESULT ParseGetGprsCapsClass(LPCSTR szRsp, void*& pBlob, UINT& cbBlob, LPVOID pParam);
HRESULT ParseGetGprsCapsContext(LPCSTR szRsp, void*& pBlob, UINT& cbBlob, LPVOID pParam);
HRESULT ParseGetGprsCapsQOS(LPCSTR szRsp, void*& pBlob, UINT& cbBlob, LPVOID pParam);
HRESULT ParseGetGprsCapsQOSMin(LPCSTR szRsp, void*& pBlob, UINT& cbBlob, LPVOID pParam);
HRESULT ParseGetGprsCapsSMOSMS(LPCSTR szRsp, void*& pBlob, UINT& cbBlob, LPVOID pParam);

void ClearGPRSParamCache();
